package other;

public class Test泛型{
	public static void main(String[] args) throws InstantiationException, IllegalAccessException {
		泛型 fx  =  new  泛型();
		String str = fx.getObj(String.class);
		str += "sd";
		System.out.println(str);
	}
}

 /**
 * <p>Title: 泛型工厂</p>
 */
class 泛型{
	public <T> T getObj(Class<T> tc) throws InstantiationException, IllegalAccessException{
		return tc.newInstance();
	}
}
